OPTIONAL. Supply a fixed string to use as browser-state key for unauthenticated clients.
550040
def OIDC_UNAUTHENTICATED_SESSION_MANAGEMENT_KEY(self):
        

        # Memoize generated value
        if not self._unauthenticated_session_management_key:
            self._unauthenticated_session_management_key = ''.join(
                random.choice(string.ascii_uppercase + string.digits) for _ in range(100))
        return self._unauthenticated_session_management_key
628142
def _get_random_string(length=44,
                       allowed_chars='abcdefghijklmnopqrstuvwxyz'
                       'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
                       secret_key=settings.secret_key_bytes()):
    
    secret_key = _ensure_bytes(secret_key)
    _reseed_if_needed(using_sysrandom, secret_key)
    return ''.join(random.choice(allowed_chars) for i in range(length))
1134632
public static KeyPair loadKey(String pemString, String passwd) throws IOException, GeneralSecurityException {
        return PrivateKeyProvider.loadKey(pemString, passwd);
    }
146120
function privateToPublic(privateKey) {
  if (typeof privateKey !== 'string') { throw new Error(`[ethjs-account] private key must be type String, got ${typeof(privateKey)}`); }
  if (!privateKey.match(/^(0x)?[0-9a-fA-F]{64}$/)) { throw new Error('[ethjs-account] private key must be an alphanumeric hex string that is 32 bytes long.'); }

  const privateKeyBuffer = new Buffer(stripHexPrefix(privateKey), 'hex');
  return (new Buffer(secp256k1.keyFromPrivate(privateKeyBuffer).getPublic(false, 'hex'), 'hex')).slice(1);
}
764320
def get(self, section, option, *args):
        """"""
        if self.is_secure_option(section, option) and self.keyring_available:
            s_option = "%s%s" % (section, option)
            if self._unsaved.get(s_option, [''])[0] == 'set':
                res = self._unsaved[s_option][1]
            else:
                res = keyring.get_password(self.keyring_name, s_option)
        else:
            res = ConfigParser.get(self, section, option, *args)
        if res == '!!False!!':
            return False
        return res
900952
def authenticationReject():
    """"""
    a = TpPd(pd=0x5)
    b = MessageType(mesType=0x11)  # 00010001
    packet = a / b
    return packet
1342267
private PublicKey getRSAPublicKey(Provider provider) {

        try {
            RSAPublicKeySpec publicKeySpec = getRSAPublicKeySpec();
            KeyFactory factory = provider != null ? KeyFactory.getInstance("RSA", provider)
                    : KeyFactory.getInstance("RSA");

            return factory.generatePublic(publicKeySpec);
        } catch (GeneralSecurityException e) {
            throw new IllegalStateException(e);
        }
    }
357374
function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0)
    {
        return uc_authcode($string, $operation, $key, $expiry);
    }
129774
private synchronized PublicKey fetchPublicKey(JsonNode messageJson) {
        URI certUrl = URI.create(messageJson.get(SIGNING_CERT_URL).asText());
        PublicKey publicKey = certificateCache.get(certUrl.toString());
        if (publicKey == null) {
            publicKey = createPublicKey(downloadCertWithRetries(certUrl));
            certificateCache.add(certUrl.toString(), publicKey);
        }
        return publicKey;
    }
834507
function authKeyWithSaltToStorableBuffer(authKey, serverSalt)
{
  return Buffer.concat([authKey.id, authKey.value, serverSalt], 272);
}
452259
private static String encodeAuthPlain(String username, char[] password) {
        // PLAIN mechanism encoding - NUL + username + NUL + password
        int size = username.length() + password.length + 2;
        ByteBuffer buffer = ByteBuffer.allocate(size);
        buffer.put((byte)0);
        buffer.put(username.getBytes());
        buffer.put((byte)0);
        buffer.put(new String(password).getBytes());
        
        buffer.flip();
        
        // Nulling out the password for security. 
        Arrays.fill(password, '\0');

        int len = buffer.remaining();
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < len; i++)
        {
            builder.append((char)(buffer.get() & 0xff)); 

        }
        String s = builder.toString();
        return s;

    }
1369452
def _auth_key(nonce, username, password):
    
    digest = _password_digest(username, password)
    md5hash = hashlib.md5()
    data = "%s%s%s" % (nonce, username, digest)
    md5hash.update(data.encode('utf-8'))
    return _unicode(md5hash.hexdigest())
144141
static AuthRequest fromString(String str) {
        String[] parts = str.split("-----");
        String clientId = parts[0];
        String[] scopes = parts.length == 2 ? parts[1].split(",") : new String[0];
        AuthRequest req = new AuthRequest("", clientId).withScopes(scopes);
        return req;
    }
99094
def unauthenticated(scope=nil)
      constraint = lambda do |request|
        not request.env["warden"].authenticate? :scope => scope
      end

      constraints(constraint) do
        yield
      end
    end
116216
public void onHostKeyMismatch(String host, SshPublicKey pk,
			SshPublicKey actual) {
		try {
			System.out.println("The host key supplied by " + host + "("
					+ pk.getAlgorithm() + ")" + " is: "
					+ actual.getFingerprint());
			System.out.println("The current allowed key for " + host + " is: "
					+ pk.getFingerprint());
			getResponse(host, actual);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
756956
def unsign_url_safe(token, secret_key, salt=None, **kw):
    
    if len(token.split(".")) == 3:
        s = URLSafeTimedSerializer2(secret_key=secret_key, salt=salt, **kw)
        value, timestamp = s.loads(token, max_age=None, return_timestamp=True)
        now = datetime.datetime.utcnow()
        if timestamp > now:
            return value
        else:
            raise itsdangerous.SignatureExpired(
                'Signature age %s < %s ' % (timestamp, now),
                payload=value,
                date_signed=timestamp)
    else:
        s = itsdangerous.URLSafeSerializer(secret_key=secret_key, salt=salt, **kw)
        return s.loads(token)
1178499
public PrivateKey unwrapPrivateKey(String wrappedKey) {

        return (PrivateKey) unwrap(wrappedKey, Keys.ASYMMETRIC_ALGORITHM,
                Cipher.PRIVATE_KEY, WRAP_ALGORITHM_ASYMMETRIC);
    }