PGPManaged..::..Validate Method
Validates the specified key ring is safe to use.
Namespace:
Walter.Cypher.PGPAssembly: Walter.Cypher (in Walter.Cypher.dll)
Syntax
[MethodImplAttribute] public bool Validate( KeyRing keyRing )
Parameters
- keyRing
- Type: Walter.Cypher.PGP..::..KeyRing
The key ring to validate.
Return Value
true if the key-ring round trips without data loss, false otherwise.Examples
C#
var keyGen = new PGPKeyGenerator(); /// var keyRing2048 = keyGen.GenerateKeys(PGPKeySize.Key2048); var keyRing4096 = keyGen.GenerateKeys(PGPKeySize.Key4096); var pgp = new PGPManaged(); var v2048 = pgp.Validate(keyRing2048); var v4096 = pgp.Validate(keyRing4096); Assert.IsTrue(v2048); Assert.AreEqual(v2048, v4096);