mirror of https://github.com/NekoX-Dev/NekoX.git
41 lines
1.6 KiB
Java
41 lines
1.6 KiB
Java
/*
|
|
* Copyright (C) 2017 Schürmann & Breitmoser GbR
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
package org.sufficientlysecure.keychain.pgp;
|
|
|
|
import java.util.regex.Pattern;
|
|
|
|
public class PgpHelper {
|
|
|
|
public static final Pattern PGP_MESSAGE = Pattern.compile(
|
|
".*?(-----BEGIN PGP MESSAGE-----.*?-----END PGP MESSAGE-----).*", Pattern.DOTALL);
|
|
|
|
public static final Pattern PGP_CLEARTEXT_SIGNATURE = Pattern
|
|
.compile(".*?(-----BEGIN PGP SIGNED MESSAGE-----.*?-----" +
|
|
"BEGIN PGP SIGNATURE-----.*?-----END PGP SIGNATURE-----).*",
|
|
Pattern.DOTALL);
|
|
|
|
public static final Pattern PGP_PUBLIC_KEY = Pattern.compile(
|
|
".*?(-----BEGIN PGP PUBLIC KEY BLOCK-----.*?-----END PGP PUBLIC KEY BLOCK-----).*",
|
|
Pattern.DOTALL);
|
|
|
|
public static final Pattern PGP_PRIVATE_KEY = Pattern.compile(
|
|
".*?(-----BEGIN PGP PRIVATE KEY BLOCK-----.*?-----END PGP PRIVATE KEY BLOCK-----).*",
|
|
Pattern.DOTALL);
|
|
|
|
}
|