added setting of algorithm name
private transient KyberPrivateKeyParameters params;
private transient String algorithm;
- private transient byte[] encoding;
private transient ASN1Set attributes;
public BCKyberPrivateKey(
KyberPrivateKeyParameters params)
{
this.params = params;
+ this.algorithm = Strings.toUpperCase(params.getParameters().getName());
}
public BCKyberPrivateKey(PrivateKeyInfo keyInfo)
@@ -45,7 +45,7 @@ private void init(PrivateKeyInfo keyInfo)
{
this.attributes = keyInfo.getAttributes();;
this.params = (KyberPrivateKeyParameters)PrivateKeyFactory.createKey(keyInfo);
-
+ this.algorithm = Strings.toUpperCase(params.getParameters().getName());
}
/**
@@ -96,12 +96,6 @@ public final String getAlgorithm()
{
return null;
}
-// if (encoding == null)
-// {
-// encoding = KeyUtil.getEncodedPrivateKeyInfo(params, attributes);
-// }
-//
-// return Arrays.clone(encoding);
}
public KyberPublicKey getPublicKey()
