mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-03 13:45:59 +01:00
67 lines
1.9 KiB
PHP
67 lines
1.9 KiB
PHP
<?php
|
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
# source: GoogleAuth.proto
|
|
|
|
namespace App\Protobuf\GoogleAuth\Payload;
|
|
|
|
use UnexpectedValueException;
|
|
|
|
/**
|
|
* Protobuf type <code>app.Protobuf.GoogleAuth.Payload.Algorithm</code>
|
|
*/
|
|
class Algorithm
|
|
{
|
|
/**
|
|
* Generated from protobuf enum <code>ALGORITHM_UNSPECIFIED = 0;</code>
|
|
*/
|
|
const ALGORITHM_UNSPECIFIED = 0;
|
|
/**
|
|
* Generated from protobuf enum <code>ALGORITHM_SHA1 = 1;</code>
|
|
*/
|
|
const ALGORITHM_SHA1 = 1;
|
|
/**
|
|
* Generated from protobuf enum <code>ALGORITHM_SHA256 = 2;</code>
|
|
*/
|
|
const ALGORITHM_SHA256 = 2;
|
|
/**
|
|
* Generated from protobuf enum <code>ALGORITHM_SHA512 = 3;</code>
|
|
*/
|
|
const ALGORITHM_SHA512 = 3;
|
|
/**
|
|
* Generated from protobuf enum <code>ALGORITHM_MD5 = 4;</code>
|
|
*/
|
|
const ALGORITHM_MD5 = 4;
|
|
|
|
private static $valueToName = [
|
|
self::ALGORITHM_UNSPECIFIED => 'ALGORITHM_UNSPECIFIED',
|
|
self::ALGORITHM_SHA1 => 'ALGORITHM_SHA1',
|
|
self::ALGORITHM_SHA256 => 'ALGORITHM_SHA256',
|
|
self::ALGORITHM_SHA512 => 'ALGORITHM_SHA512',
|
|
self::ALGORITHM_MD5 => 'ALGORITHM_MD5',
|
|
];
|
|
|
|
public static function name($value)
|
|
{
|
|
if (!isset(self::$valueToName[$value])) {
|
|
throw new UnexpectedValueException(sprintf(
|
|
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
|
}
|
|
return self::$valueToName[$value];
|
|
}
|
|
|
|
|
|
public static function value($name)
|
|
{
|
|
$const = __CLASS__ . '::' . strtoupper($name);
|
|
if (!defined($const)) {
|
|
throw new UnexpectedValueException(sprintf(
|
|
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
|
}
|
|
return constant($const);
|
|
}
|
|
}
|
|
|
|
// Adding a class alias for backwards compatibility with the previous class name.
|
|
class_alias(Algorithm::class, \App\Protobuf\GoogleAuth\Payload_Algorithm::class);
|
|
|