Ejemplo n.º 1
0
        private ProofOfPossession(Asn1TaggedObject tagged)
        {
            tagNo = tagged.TagNo;
            switch (tagNo)
            {
            case 0:
                obj = DerNull.Instance;
                break;

            case 1:
                obj = PopoSigningKey.GetInstance(tagged, false);
                break;

            case 2:
            case 3:
                obj = PopoPrivKey.GetInstance(tagged, false);
                break;

            default:
                throw new ArgumentException("unknown tag: " + tagNo, "tagged");
            }
        }
Ejemplo n.º 2
0
 /**
  * Creates a ProofOfPossession for key encipherment or agreement.
  * @param type one of TYPE_KEY_ENCIPHERMENT or TYPE_KEY_AGREEMENT
  */
 public ProofOfPossession(int type, PopoPrivKey privkey)
 {
     tagNo = type;
     obj   = privkey;
 }