libaxolotl.ecc.Curve25519.getInstance C# (CSharp) Method

getInstance() public static method

Accesses the currently in use Curve25519 provider, according to the type requested.
public static getInstance ( Curve25519ProviderType type ) : Curve25519
type Curve25519ProviderType Type of provider requested.
return Curve25519
		public static Curve25519 getInstance(Curve25519ProviderType type)
		{
			if (instance == null)
			{
				instance = new Curve25519();
				instance.provider = (ICurve25519Provider)new Curve25519NativeProvider();
			}
			return instance;
		}

Usage Example

Exemplo n.º 1
0
        public static ECKeyPair generateKeyPair()
        {
            Curve25519KeyPair keyPair = Curve25519.getInstance(BEST).generateKeyPair();

            return(new ECKeyPair(new DjbECPublicKey(keyPair.getPublicKey()),
                                 new DjbECPrivateKey(keyPair.getPrivateKey())));
        }
All Usage Examples Of libaxolotl.ecc.Curve25519::getInstance